<?php
/**
 * date format 
 *
 */
class Of_Date extends Zend_Date 
{
  private static $options = array();
  public static function setOptions($options)
  {
    self::$options = $options;
  }
  
  /**
   * create new instance
   * 
   * @return Of_Date
   */
  public static function newInstance($date = null, $part = null, $locale = null)
  {
    
    Zend_Date::setOptions(array(
      'format_type' => 'php'
    ));
    
    if($locale === null && isset(self::$options['locale']))
    {
      $locale = self::$options['locale'];
    }
    
    return new Of_Date($date, $part, $locale);
  }
  
}